package com.cskaoyan.bean.bo.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import net.sf.json.JSONArray;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/19 13:32
 */
@Data
@TableName("market_goods_product")
public class CreateProductsBO {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String specifications;

    private BigDecimal price;

    private Integer number;

    private String url;

    private Integer goodsId;

    private Date addTime;

    private Date updateTime;

    public void setSpecifications(List<String> specifications) {
        this.specifications = JSONArray.fromObject(specifications).toString();
    }
}
